# Maintainer: Ivan Semkin (ivan at semkin dot ru)

pkgname=gsettings-qt-git
_pkgname=gsettings-qt
pkgver=r185.c8ecb2b
pkgrel=1
pkgdesc='Library to access GSettings from Qt'
url='https://github.com/ubports/gsettings-qt'
arch=(x86_64 i686 armv7h aarch64)
license=(LGPL)
depends=(qt5-base qt5-declarative)
makedepends=(git)
provides=(gsettings-qt)
replaces=(gsettings-qt)
source=('git+https://github.com/ubports/gsettings-qt.git')
sha256sums=('SKIP')

#BUILDENV+=('!check') 

pkgver() {
  cd ${_pkgname}
  echo "r$(git rev-list --count HEAD).$(git describe --always)"
}

prepare() {
  cd ${_pkgname}
  git checkout bionic
}

build() {
  cd ${_pkgname}
  qmake-qt5 PREFIX=/usr
  make -j1 # Failing racing condition if built with -j > 1
}

package() {
  cd ${_pkgname}
  make INSTALL_ROOT="${pkgdir}" install
  rm -rf "${pkgdir}"/usr/tests
}
# vim:set ts=2 sw=2 et:
